package com.ml.test;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

public class test {
    public static void  main(String arg[]){
        /*List list = new ArrayList();
        list.add("2019-06-15 09:21:31");
        list.add("2019-06-15 09:22:32");
        list.add("2019-06-15 18:23:33");
        list.add("2019-06-15 19:26:39");

        Object a[] = (Object [])list.toArray();
        Object first = a[0];
        Object last = a[a.length-1];
        System.out.println(first);
        System.out.println(last);*/


        Calendar date = Calendar.getInstance();

        String year = String.valueOf(date.get(Calendar.YEAR));
        System.out.println(year);
        System.out.println(date.get(Calendar.MONTH));
    }
}
